<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>登录</title>
<header th:replace="header::html"></header>
<link rel="stylesheet" th:href="@{/xadmin/css/login.css}" />
	<!--<script src="https://cdn.staticfile.org/jquery/1.12.3/jquery.min.js"></script>-->
</head>
<body>

	<div class="login">
		<div class="message">后台管理系统</div>
		<div id="darkbannerwrap"></div>

        <form action="/login/form" id="login-form" method="post">
			<input id="username" name="username" placeholder="用户名" type="text" autocomplete="off">
			<hr class="hr15">
			<input id="password" name="password" placeholder="密码" type="password" autocomplete="off">
			<hr class="hr15">
            <input style="width: 100%;" lay-submit lay-filter="login" type="submit" value="登录">
			<hr class="hr20">
			<span id="info" style="color: red"></span>
		</form>
	</div>
</body>
<script>
	// function login() {
	// 	var username = $("#username").val();
	// 	var password = $("#password").val();
	//
	// 	if (username === "" || password === "") {
	// 	    alert("用户名或密码不能为空!")
	// 	}
	//
	// 	$.ajax({
	// 		type: "POST",
	// 		url: "/login/form",
	// 		data: {
	// 		    "username" : username,
	// 			"password" : password
	// 		},
	// 		success: function (json) {
	// 			if (json.isok) {
	// 			    location.href = json.data;
	// 			} else {
	// 			    alert(json.message)
	// 			}
    //         },
	// 		error: function (e) {
	// 			console.log(e.responseText)
    //         }
	// 	})
    // }
</script>
</html>